<template>
	<div class="d-flex">
		<van-sidebar v-model="activeKey">
			<van-sidebar-item :title="item.name" v-for="(item,index) in categary_list" :key="index+''" />
		</van-sidebar>
		<div style="flex:1;">
			<div class="d-flex flex-wrap space-around" >
				  <div class="flex-column d-flex j-center a-center" v-for="(temp,i) in categary_list[activeKey].app_category_items" :key="i+''" style="width:30%;">
					    <img :src="temp.cover" alt="" style="width: 60px;">
						<div>{{temp.name}}</div>
				  </div>
			</div>
		</div>
	</div>
</template>
<script>
	import {
		clazz
	} from '../lib/clazz.js';
	export default {
		data() {
			return {
				activeKey: 0,
				categary_list: []
			}
		},
		created() {
			  this.init()
		},
		methods:{
			init(){
				clazz().then(res => {
					console.log(res)
					this.categary_list = res.data
				})
			}
		}
	}
</script>
